<template>
  <header class="dz-header is-bg is-fixed">
    <div class="dz-header-button is-left">
      <a>
        <span class="iconfont">&#xe6b7;</span>
      </a>
    </div>
    <h1 class="dz-header-title" v-text="title"></h1>
    <div class="dz-header-button is-right">
      <a>
        <span class="iconfont">&#xe61b;</span>
      </a>
    </div>
  </header>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: ""
    }
  }
};
</script>
<style lang="less" scoped>
@import "../../assets/styles/var.less";
.dz-header {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 10px;
  background-color: #fff;
  color: @headerDefaultColor;
  border: 1px solid #eee;
  a {
    color: @headerDefaultColor;
  }
  .dz-header-button {
    width: 70px;
    align-items: stretch;
    &.is-left {
      text-align: left;
    }
    &.is-right {
      text-align: right;
    }
  }
  .dz-header-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  &.is-bg {
    background: @headerBg;
    color: #fff;
    a {
      color: #fff;
    }
    .dz-header-title {
      color: #fff;
    }
  }
  &.is-fixed {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 9;
  }
}
</style>